application of cauchys residue theorem